﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sispe.Repository.Mapping;
using System.Data.Entity.Infrastructure;
using System.Data.Objects;
using System.Data;
using Sispe.Entities;

namespace Sispe.Repository
{
    public class MasterRepository
    {
        public MasterRepository()
        {
            if (_context == null)
            {
                _context = new SISPEContext();
                _objectContext = ((IObjectContextAdapter)_context).ObjectContext;
            }
        }

        private SISPEContext _context;
        protected SISPEContext context
        {
            get { return _context; }
        }

        private ObjectContext _objectContext;
        protected ObjectContext ObjectContext
        {
            get { return _objectContext; }
        }
    }
}
